using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Mathematics;
public class CesiumGlobeAnchorComponent : MonoBehaviour
{
    private CesiumGeoreference Georeference;

    [Header("经度")]
    [Range(-180.0f,180.0f)]
    public double Longitude;
    [Header("纬度")]
      [Range(-90.0f,90.0f)]
    public double Latitude;

    public double Height;

    /**
     * The Earth-Centered Earth-Fixed X-coordinate of this component in meters.
     */

    public double ECEF_X = 0.0;

    /**
     * The Earth-Centered Earth-Fixed Y-coordinate of this component in meters.
     */

    public double ECEF_Y = 0.0;

    /**
     * The Earth-Centered Earth-Fixed Z-coordinate of this component in meters.
     */
    public double ECEF_Z = 0.0;
    public double3 GetLongitudeLatitudeHeight()
    {
        //   if (this._actorToECEFIsValid == null || this.ResolvedGeoreference == null)
        //   {
        //       Debug.Log("CesiumGlobeAnchorComponent %s globe position is invalid because the component is not yet registered.");
        //       return double3.zero;
        //   }

        //   return this->ResolvedGeoreference->TransformEcefToLongitudeLatitudeHeight(
        //       this->GetECEF());
        return double3.zero;
    }

    /**
 * Move the actor to the specified longitude in degrees (x), latitude
 * in degrees (y), and height in meters (z).
 *
 * If `AdjustOrientationForGlobeWhenMoving` is enabled, the Actor's
 * orientation will also be adjusted to account for globe curvature.
 */
    void MoveToLongitudeLatitudeHeight(double3 TargetLongitudeLatitudeHeight)
    {

    }

    /**
 * Move the actor to the specified longitude in degrees (x), latitude
 * in degrees (y), and height in meters (z).
 *
 * If `AdjustOrientationForGlobeWhenMoving` is enabled, the Actor's
 * orientation will also be adjusted to account for globe curvature.
 *
 * This function is inaccurate because large coordinate values are represented
 * as singe-precision floating point numbers.
 */
    void InaccurateMoveToLongitudeLatitudeHeight(Vector3 TargetLongitudeLatitudeHeight)
    {

    }
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }
}
